home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / Storage / Bento / SessHdr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  2.1 KB  |  88 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SessHdr.h
  3.  
  4.     Contains:    Definition for session-related Bento Handlers.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1992 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <4>    10/24/95    jpa        1293441: DM: Bento memory reserve.
  13.          <3>     6/20/94    CC        ODMemoryHeap* changed to ODMemoryHeapID.
  14.          <2>     6/15/94    RR        ODHeap -> ODMemoryHeap
  15.          <1>     5/27/94    VL        first checked in
  16.  
  17.     To Do:
  18.     In Progress:
  19.         
  20. */
  21.  
  22.  
  23. #ifndef _SESSHDR_
  24. #define _SESSHDR_
  25.  
  26. #ifndef __CM_API__
  27. #include "CMAPI.h"
  28. #endif
  29.  
  30. #ifndef _ODTYPES_
  31. #include "ODTypes.h"
  32. #endif
  33.  
  34. #ifndef _ODMEMORY_
  35. #include "ODMemory.h"
  36. #endif
  37.  
  38. //==============================================================================
  39. // Classes used by this interface
  40. //==============================================================================
  41. class ODContainer;
  42.  
  43. //==============================================================================
  44. // Scalar Types
  45. //==============================================================================
  46.  
  47. typedef struct ODSessionRefCon ODSessionRefCon;
  48. struct ODSessionRefCon {
  49.     ODSessionRefCon() {}
  50.     ~ODSessionRefCon() {}
  51.     ODContainer*    container;
  52.     ODMemoryHeapID            heap;
  53.  
  54.     void*            cmAllocReserveBlock;
  55.     CMSize           cmAllocReserveSize;
  56.     
  57. #ifdef ODDebugBentoSize
  58.     ODULong          fMark;
  59.     ODULong          fTotal;
  60.     ODULong          fHighest;
  61.     // ODULong          fLowest;
  62.     ODULong          fHigh;
  63.     ODULong          fLow;
  64.     ODBoolean        fUp;
  65. #endif
  66.  
  67. };
  68.  
  69. void ODSessionMustHaveCMAllocReserve(CMContainer cmContainer);
  70. void ODSessionRestoreCMAllocReserve(CMContainer cmContainer);
  71.  
  72.  
  73. //==============================================================================
  74. // sessionRoutinesMetahandler
  75. //==============================================================================
  76.  
  77.     CM_CFUNCTION
  78.     
  79. CMHandlerAddr CM_FIXEDARGS sessionRoutinesMetahandler(CMType targetType, CMconst_CMGlobalName operationType);
  80.  
  81.     // Metahandler proc for determining the addresses of the session handler operation routines.
  82.     // Pass the address of this routine to a CMStartSession() call.
  83.  
  84.     CM_END_CFUNCTIONS
  85.  
  86.  
  87. #endif    // _SESSHDR_
  88.